const express = require('express');
const router = express.Router();
const StatisticsController = require('../controllers/StatisticsController');
const { authenticateToken, requireAdmin } = require('../middleware/auth');

// 统计路由 - 需要管理员权限
router.get('/overall', authenticateToken, requireAdmin, StatisticsController.getOverallStats);
router.get('/users', authenticateToken, requireAdmin, StatisticsController.getUserStats);
router.get('/courses', authenticateToken, requireAdmin, StatisticsController.getCourseStats);
router.get('/orders', authenticateToken, requireAdmin, StatisticsController.getOrderStats);
router.get('/revenue', authenticateToken, requireAdmin, StatisticsController.getRevenueStats);
router.get('/learning', authenticateToken, requireAdmin, StatisticsController.getLearningStats);

module.exports = router; 